#!/bin/sh

FIN_URL="http://download.finance.yahoo.com/d/quotes.csv?"
FIN_QUERY="s0l1y0"   # symbol,price,yield

SYMBOL_FILE=$1
if [ -f $SYMBOL_FILE ]; then
    for symbol in `cat $SYMBOL_FILE`; do
        curl -s "${FIN_URL}s=${symbol}&f=${FIN_QUERY}"
    done
else
    curl -s "${FIN_URL}s=${SYMBOL_FILE}&f=${FIN_QUERY}"
fi

